﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

namespace OnlineAuction.Admin
{
    public partial class Manage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string webPage = HttpContext.Current.Request.Url.AbsolutePath;
            webPage = webPage.Split('/')[webPage.Split('/').Length - 1];
            webPage = webPage.Split('.')[0];
            if (webPage.CompareTo("Statistic") == 0)
            {
                liStatistic.Attributes["class"] = "active";
            }
            else if (webPage.CompareTo("ViewUsers") == 0)
            {
                liManageUsers.Attributes["class"] = "active";
            }
            else if (webPage.CompareTo("ViewCategory") == 0
                || webPage.CompareTo("AddCategory") == 0
                || webPage.CompareTo("EditCategory") == 0
                || webPage.CompareTo("MergeCategory") == 0)
            {
                liManageCategory.Attributes["class"] = "active";
            }
            else
            {
                liManageHome.Attributes["class"] = "active";
            }
        }
    }
}